package com.xz.knowledgeDuplication.pattern.combination;

/**
 * 抽象根节点
 *
 * @author 召
 * @date 2022-03-13 21:45:27
 */
public abstract class MenuComponent {

    protected String name;

    protected int level;

    public void add(MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }

    public void remove(MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }

    public MenuComponent getChild(int index) {
        throw new UnsupportedOperationException();
    }

    public abstract void print();
}
